<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/business/include/doctype.jsp" %>
<script type="text/javascript">
	function formCheck() {
		if ('Y' == '${edtChk}') {
			alert('PC에서 등록한 글은 PC에서만 수정이 가능 합니다.');
			return false;
		}
		if($('#txtTitle').val() == '') {
			alert('제목을 입력해 주세요.');
			return;
		}
		if($('#htmlbody').val() == '') {
			alert('내용을 입력해 주세요.');
			return;
		}
		if (confirm('수정하시겠습니까?')) {
			document.ideaForm.submit();
		}
	}
</script>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>O.I. 제안</h1>
		</div><!-- // header -->
		<div class="content">
			<h3>아이디어 제안</h3>
			<div class="table5">
				<form name="ideaForm" action="${requestScope.contextPath}/business/mOI_/mOIIdeaSuggestionModify.do" method="post" onsubmit="return false;">
				<input type="hidden" name="page" value="${param.page}" />
				<input type="hidden" name="seq" value="${param.seq}" />
				<input type="hidden" name="pageGubun" value="${param.pageGubun}" />
				<input type="hidden" name="endY" value="${param.endY}" />
				<input type="hidden" name="sugflag" value="${param.sugflag}" />
				<c:choose>
				<c:when test="${map.ACCEPTDEPTCD == null or map.ACCEPTDEPTCD eq ''}">
				<input type="hidden" name="JudgeDeptCode" value="${sessionScope.SESSION_USER_INFO.DeptCode}" />
				</c:when>
				<c:otherwise>
				<input type="hidden" name="JudgeDeptCode" value="${map.ACCEPTDEPTCD}" />
				</c:otherwise>
				</c:choose>
				
				<input type="hidden" name="ContextFlag" value="${map.ContextFlag}" />
				<table summary="아이디어 수정" cellspacing="0" style="width:100%;">
					<caption>아이디어 수정</caption>
					<colgroup>
						<col style="width:25%" />
						<col style="width:75%" />
						</colgroup>
					<tbody>
						<tr>
							<th scope="row"><label for="name">제안자</label></th>
							<td><input type="text" name="name" id="name" class="intxt3" value="${sessionScope.SESSION_USER_INFO.UserName} ${sessionScope.SESSION_USER_INFO.DeptName}" readonly="readonly" /></td>
						</tr>
						<tr>
							<th scope="row"><label for="JudgeDeptCode">심사부서</label></th>
							<td><input type="text" name="JudgeDeptCode" class="intxt5" id="JudgeDeptCode" value="${map.ACCEPTDEPTNAME}" readonly="readonly" /></td>
						</tr>
						<!-- 
						<tr>
							<th scope="row"><label for="security">보 안</label></th>
							<td><input type="checkbox" class="intxt5" id="security" name="chkSecurity" value="3" /></td>
						</tr>
						 -->
						<c:choose>
						<c:when test="${sessionScope.SESSION_USER_INFO.CompanyCD eq 'KIC'}">
						<tr>
							<th scope="row">유형</th>
							<td><input type="radio" name="radiobutton" <c:if test="${map.SugFlag eq 'A00001'}">checked="checked"</c:if> id="oi" value="1" /><label for="oi">O.I. 제안</label>&nbsp;&nbsp;<input type="radio" name="radiobutton" id="operate" <c:if test="${map.SugFlag eq 'A00002'}">checked="checked"</c:if> value="2" /><label for="operate">COST제안</label></td>
						</tr>
						</c:when>
						<c:when test="${sessionScope.SESSION_USER_INFO.CompanyCD eq 'KGT'}">
						<tr>
							<th scope="row">유형</th>
							<td><input type="radio" name="radiobutton" <c:if test="${map.SugFlag eq 'A00001'}">checked="checked"</c:if> id="oi" value="1" /><label for="oi">O.I. 제안</label>&nbsp;&nbsp;<input type="radio" name="radiobutton" id="operate" <c:if test="${map.SugFlag eq 'A00002'}">checked="checked"</c:if> value="2" /><label for="operate">환경경영</label></td>
						</tr>
						</c:when>
						</c:choose>
						<tr>
							<th scope="row"><label for="txtTitle">제목</label></th>
							<td><input type="text" name="txtTitle" class="intxt3" id="txtTitle" value="${map.Title}" /></td>
						</tr>
						<tr>
							<th scope="row"><label for="htmlbody">제안내용</label></th>
							<td><textarea cols="" rows="8" class="comment" id="htmlbody" name="htmlbody">${map.Content}</textarea></td>
						</tr>
					</tbody>
				</table>
				</form>
			</div>
			<div class="btn_area2" style="padding-bottom:20px;">
				<p><a href="#" onclick="formCheck();"><img src="${requestScope.contextPath}/images/btn/btn_modify.gif" alt="수정" /></a>&nbsp;&nbsp;<a href="javascript:history.back(-1);"><img src="${requestScope.contextPath}/images/btn/btn_reset.gif" alt="취소" /></a></p>
			</div>
		</div><!-- // content -->
	</div><!-- // wrap -->
</body>
</html>